package goodroommate.domain;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;

public class News {

	private int newsid;
	private String subject;
	private String content;
	private Timestamp time;
	public int getNewsid() {
		return newsid;
	}
	public void setNewsid(int newsid) {
		this.newsid = newsid;
	}
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Timestamp getTime() {
		return time;
	}
	public void setTime(Timestamp time) {
		this.time = time;
	}
	public String getTimeFormatted() {
		if (this.time == null) return "";
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
		return df.format(this.time);
	}
	
}
